<template>
  <div class="view-account">
    <div class="view-account-header"></div>
    <div class="view-account-container">
      <div class="view-account-top">
        <div class="view-account-top-logo">
          <img src="~@/assets/images/account-logo.png" alt="" />
        </div>
        <div class="view-account-top-desc">Naive Ui Admin中台前端/设计解决方案</div>
      </div>
      <div class="success">
        <n-icon size="40" color="#52c41a">
          <CheckmarkCircleOutline/>
        </n-icon>
        <p class="success-words">恭喜您，您的账号{{account}}密码已经重置成功</p>
        <n-grid :cols="1" style="margin-top: 10vh">
            <n-gi :span="1">
              <router-link to="/login">
                <n-button type="primary" size="large" style="margin-right:10px;">立即登录</n-button>
              </router-link>
              <router-link to="/register">
                <n-button size="large">返回注册</n-button>
              </router-link>
            </n-gi>
        </n-grid>
      </div>
    </div>
  </div>
</template>

<script>
import {defineComponent,ref,reactive,onMounted} from 'vue'
import {useRoute} from 'vue-router'
import {NGrid} from 'naive-ui'
import {CheckmarkCircleOutline} from '@vicons/ionicons5'
export default defineComponent({
  name: "RestResult",
  components:{
    CheckmarkCircleOutline,
    NGrid
  },
  setup(){
    const route=useRoute();
    const account=ref('');
    onMounted(()=>{
      account.value=route.query.account;
    })
    return {
      account
    }
  }
})
</script>


<style lang="less" scoped>
.success{
  text-align: center;
  .success-words {
    margin-top: 32px;
    font-size: 20px;
    line-height: 28px;
  }
}
.view-account {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: auto;

  &-container {
    flex: 1;
    padding: 32px 0;
    width: 384px;
    margin: 0 auto;
  }

  &-top {
    padding: 32px 0;
    text-align: center;

    &-desc {
      font-size: 14px;
      color: #808695;
    }
  }

  &-other {
    width: 100%;
  }

  .default-color {
    color: #515a6e;

    .ant-checkbox-wrapper {
      color: #515a6e;
    }
  }
}

@media (min-width: 768px) {
  .view-account {
    background-image: url('../../assets/images/login.svg');
    background-repeat: no-repeat;
    background-position: 50%;
    background-size: 100%;
  }

  .page-account-container {
    padding: 32px 0 24px 0;
    .success {
      text-align: center;
      .buttons {
        margin-top: 40px;
      }
    }
  }
}
</style>

